﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChainTest
{
    /// <summary>
    /// 链式调用测试
    /// </summary>
    class Program
    {
        static bool funTest(bool res)
        {
            Console.WriteLine(res ? "Success" : "Fail");
            return res;
        }
        static void Main(string[] args)
        {
            Chain chain = new
                Chain(funTest(true))
                .Next(m => funTest(false))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true))
                .Next(m => funTest(true));
            Console.ReadLine();
        }
    }
}
